home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d1
/
g.arc
/
G.DOC
next >
Wrap
Text File
|
1989-10-04
|
9KB
|
240 lines
G - Directory Nickname Utility
==============================
NAME
G - Go to directory...
SYNOPSIS
G - current directory
G nickname - go to directory
G -l [nickname] - list nicknames file (unsorted)
G -n - list sorted by nickname
G -p - list sorted by path
G -a nickname [path] - add a nickname to nicknames file
G -d nickname - delete a nickname from the file
G -r nickname1 nickname2 - rename a nickname
G -f [path] - find nickname for a path
G -c - clean up the nicknames file
G -s - statistics on the nicknames file
G -i - info
G -? - help
INTRODUCTION
G allows you to give nicknames to your favourite directories.
G keeps a file of nicknames and associated paths and allows you to change
directories by using the nickname instead of the path.
This can be really handy for frequently used directories or long path
names.
G has all the functionality of the DOS cd or chdir command and can be used
as an enhancement or replacement for cd.
G has a complete set of command switches for maintaining the nicknames
file. They include List, Add, Delete, Rename, Find and Cleanup, as well
as the ability to show the current directory.
G is able to change drives as well. So you may use G to save keystrokes
when you want to go to a path on another drive. This is handy for use on
a network where you may have many drives accessable.
G uses an environment variable to decide where its file of nicknames is
kept. You therefore can have multiple nickname files by simply changing
the contents of the environment variable.
G keeps the previous directory name in nickname 'back', you can always
return to where you where easily.
G sets the ERRORLEVEL on exit to 0 if successful or 1 if not. Can be
used in batch files to control batch execution.
USAGE
G
- Used alone G reports the current directory.
G -?
- Help with G's command line switches.
G nickname
- Change the current directory, G searches for the directory to change
to in 3 ways:
1 - Use 'nickname' as an explicit path, try to cd to it.
This is exactly like typing 'cd nickname'.
2 - Search the nicknames file for 'nickname'.
If found try to cd to the associated path.
3 - Search the DOS environment for 'nickname'.
If found use the environment string as a path to cd to.
- G searches for 'nickname' in this order, when it is successful in
changing the directory it stops searching.
G -l [nickname]
- List the nicknames file with the paths. If 'nickname'is given G
searches for the nickname given only.
G -n
- List nicknames file sorted by nickname.
G -p
- List nicknames file sorted by path.
G -a nickname [path]
- Add 'nickname' to the nicknames file. If 'path' is given it will be
associated with 'nickname'. If no path is given G will use the
current directory as the path to associate with the nickname.
G -d nickname
- Delete 'nickname' from the nicknames file.
G -r nickname1 nickname2
- Rename 'nickname1' to 'nickname2'.
G -f [path]
- Find all entries in the nicknames file where 'path' matches the
nickname path. If 'path' is not given G use the current directory
as the path to find.
G -c
- G will go into "clean-up" mode, for each entry in the nicknames file
the user is asked if he wishes to keep the nickname. The user is
prompted: "Keep? Yes/No/Save/Quit". No means dump the nickname,
Save will save immediately, Quit will abort the clean-up.
G -s
- Statistics on number of nicknames and 'unused' entry spots in the
nicknames file.
G -i
- Information about G, who wrote it and why!!!
NOTES
G uses environment variable GPATHS to find the nicknames file.
-ie. SET GPATHS=c:\sys\names.g
If GPATHS is not specified the file is called 'names.g' and is placed in
the root directory. If you like you can use multiple nickname files by
changing the GPATHS environment variable.
The previous directory is always available in nickname 'back' or 'b'
-ie. type 'G b' to go back to previous path.
Drive letters can be included in a path, allowing you to change drives and
directories in one command.
-ie. G will change drives if the path associated with the nickname
given requires it.
On exit the ERRORLEVEL is set to 0 if successful or 1 if not. For use in
batch files to check if a directory change was successful.
EXAMPLES
1. Short cut to a favourite directory.
Set up a nickname to your golf games directory by typing:
G -a golf c:\games\golf
Change to your golf directory any time by typing:
G golf
G will cd to 'c:\games\golf', changing drives if necessary.
2. Save keystrokes in case of long pathnames.
Save your fingers by setting up a nickname for a long path:
G -a db c:\usr\src\lib\project\src\database
Now G will cd to 'c:\usr\src\lib\project\src\database' with:
G db
3. Temporarily save current directory path to return easily.
Set up the nickname 'sav' as the current directory:
G -a sav
Return to the 'sav' directory any time by typing:
G sav
4. Move around disks easily, eg. on your network.
You can change to a directory on another drive without the bother
of first having to change drives.
To get to the games directory on your drive F: you have to type:
F:
cd \gamesdir
With G you can combine the two commands into one:
G f:\gamesdir
Set up a nickname for the games directory:
G -a fgames f:\gamesdir
Now get to 'fgames' from any other drive with just one command:
G fgames
5. Switch between two directories quickly using the 'back' nickname.
Flip back and forth between 'golf' and the current directory:
G golf
G back
Go to 'golf' directory and flip back to where you where. Nickname
'back' always contains the previous directory. 'Back' can even be
shortened to 'b', ie. 'G b' is the same as 'G back'.
6. List your nicknames file.
List the nicknames, unsorted, by nickname or by pathname:
G -l
G -n
G -p
7. Find out if a directory has a nickname.
Remind yourself of the nickname you've given to your golf:
G -f c:\games\golf
See if there are any directories dedicated to games:
G -f games
See if the current directory has a nickname:
G -f
8. For power users, the DOS environment can also be used as a source of
G nicknames.
Temporarily set a nickname to a directory:
SET tmp=d:\temp
G tmp
Programmers jump to INCLUDE and LIB directories using environment
variables:
G include
G lib
AUTHORS
James Duhault, Dean Ecclestone and Michael King.
We wrote this little utility to use ourselves on our network and we now
find it nearly indespensible. Try it for a while and you'll wonder why
DOS doesn't have G built-in.
G - Go to directory...
Shareware from DEK Utility Corp.
Copyright (C) 1989 by J. Duhault, D. Ecclestone & M. King
Not for sale or distribution except through Shareware sources.
If you find 'G' to be of use please send $20 to
DEK Utility Corp.,
35 Denison Rd. W.,
Weston,
Ontario,
M9N 1B9
You will be added to our Updates and New Products mailing list.